<%@ page import="org.bjou.ShiroRole" %>
<!doctype html>
<html>
  <head>
    <meta name="layout" content="pertho">
  <g:set var="entityName" value="${message(code: 'shiroRole.label', default: 'ShiroRole')}" />
  <title><g:message code="default.edit.label" args="[entityName]" /></title>
</head>
<body>
  <div class="container">
    <div class="row">
      <div class="twelve columns">
        <div class="box_c">
          <div class="box_c_heading cf">
            <p><g:message code="default.edit.label" args="[entityName]" /></p>
          </div>
          <div class="box_c_content">
            <div id="edit-shiroRole" class="content scaffold-edit" role="main">
              <g:if test="${flash.message}">
                <div class="message" role="status">${flash.message}</div>
              </g:if>
              <g:hasErrors bean="${shiroRoleInstance}">
                <ul class="errors" role="alert">
                  <g:eachError bean="${shiroRoleInstance}" var="error">
                    <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                  </g:eachError>
                </ul>
              </g:hasErrors>
              <g:form method="post" >
                <g:hiddenField name="id" value="${shiroRoleInstance?.id}" />
                <g:hiddenField name="version" value="${shiroRoleInstance?.version}" />
                <fieldset class="form">
                  <div class="fieldcontain ${hasErrors(bean: shiroRoleInstance, field: 'name', 'error')} required">
                    <label for="name">
                      <g:message code="shiroRole.name.label" default="Name" />
                      <span class="required-indicator">*</span>
                    </label>
                    <g:textField   name="name" required="" value="${shiroRoleInstance?.name}"/>
                  </div>

                  <div class="fieldcontain ${hasErrors(bean: shiroRoleInstance, field: 'roleDscp', 'error')} ">
                    <label for="roleDscp">
                      <g:message code="shiroRole.roleDscp.label" default="Role Dscp" />

                    </label>
                    <g:textField name="roleDscp" value="${shiroRoleInstance?.roleDscp}"/>
                  </div>
                </fieldset>
                <fieldset class="buttons">
                  <g:actionSubmit class="gh_button" action="update" value="更新" />
                  <g:if test="${shiroRoleInstance?.roleType!=1}">
                  <g:actionSubmit class="gh_button icon danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" />
                  </g:if>
                  <g:link class="gh_button list" action="list">返回角色列表</g:link>
                
                </fieldset>
              </g:form>
              <!-- end -->
            </div>
          </div>
        </div>
      </div>
    </div>
</body>
</html>
